import React from 'react';
import { useNavigate } from 'react-router-dom';
import useMyReducer from '../../reducer';
const Index = () => {
    const navigate = useNavigate();
    const { state } = useMyReducer();
    const handleCity = () => {
        navigate('/city');
    }
    return (
        <div>
            music
            {state.city}
            <button onClick={handleCity}>{state.city}</button>
        </div>
    );
}

export default Index;
